From: Bastien Nocera Date: Sat, 19 Oct 2013 15:59:32 +0000 (+0200) Subject: power: Fix undefined variables X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3187 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0cfa7c1c5607c36ec60f4ad7db1007bdcb1403f1;p=gnome-shell.git power: Fix undefined variables A couple of variables that should have been gathered from the proxy and weren't. --- diff --git a/js/ui/status/power.js b/js/ui/status/power.js index 69a8d20e0..c7646fb81 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -79,14 +79,14 @@ const Indicator = new Lang.Class({ let minutes = time % 60; let hours = Math.floor(time / 60); - if (state == UPower.DeviceState.DISCHARGING) { + if (this._proxy.State == UPower.DeviceState.DISCHARGING) { // Translators: this is : Remaining () - return _("%d\u2236%02d Remaining (%d%%)").format(hours, minutes, percentage); + return _("%d\u2236%02d Remaining (%d%%)").format(hours, minutes, this._proxy.Percentage); } - if (state == UPower.DeviceState.CHARGING) { + if (this._proxy.State == UPower.DeviceState.CHARGING) { // Translators: this is : Until Full () - return _("%d\u2236%02d Until Full (%d%%)").format(hours, minutes, percentage); + return _("%d\u2236%02d Until Full (%d%%)").format(hours, minutes, this._proxy.Percentage); } return null;